package com.loop.unclelend.app_config

import com.loop.unclelend.utils.helper.SharedHelper

/**
 * UncleLend
 * @Author wwdeng
 * @CreateTime: 2024/9/2 10:59
 * @Annotation：APP 配置
 */
object UncleConfigs {

    /**
     * APP 名称
     */
    const val UNCLE_APPNAME = "UNCLELEND"

    /**
     * 包名
     */
    const val UNCLE_PACKAGENANME = "com.unclelend.loansuite.app"

    /**
     * 加解密
     */
    const val UNCLE_AES_KEY = "t3El9GjHlK1h3Ah8"
    const val UNCLE_AES_IV = "kyi43dgYxLVVd4t6"

    /**
     * Adjust
     */
    const val UNCLE_ADJ_TOKEN = "8gc8fy0e9cao"
    const val UNCLE_ADJ_EVENT_REGISTER = "olmacq"
    const val UNCLE_ADJ_EVENT_APPLY = "xghfiw"

    /**
     * 是否是法语地区
     *  desc：地区转发（timeZone） 以 fcfa、xaf、senegal 结尾，则定义为法语地区
     */
    fun isFrench(): Boolean{
        val timeZone = SharedHelper.getUncleSPString(SharedHelper.UNCLE_SPKEY.UNCLE_TIMEZONE)
        return timeZone.endsWith("fcfa") || timeZone.endsWith("xaf") || timeZone.endsWith("senegal")
    }

    /**
     * 加纳 233
     */
    fun isGha(): Boolean{
        val timeZone = SharedHelper.getUncleSPString(SharedHelper.UNCLE_SPKEY.UNCLE_TIMEZONE)
        return timeZone.endsWith("gha")
    }

    /**
     * 肯尼亚 254
     */
    fun isKsh(): Boolean{
        val timeZone = SharedHelper.getUncleSPString(SharedHelper.UNCLE_SPKEY.UNCLE_TIMEZONE)
        return timeZone.endsWith("ksh")
    }

    /**
     * 乌干达 256
     */
    fun isUgx(): Boolean{
        val timeZone = SharedHelper.getUncleSPString(SharedHelper.UNCLE_SPKEY.UNCLE_TIMEZONE)
        return timeZone.endsWith("ugx")
    }

    /**
     * 科特迪瓦 225
     */
    fun isFcfa(): Boolean{
        val timeZone = SharedHelper.getUncleSPString(SharedHelper.UNCLE_SPKEY.UNCLE_TIMEZONE)
        return timeZone.endsWith("fcfa")
    }

    /**
     * 喀麦隆  237
     */
    fun isXaf(): Boolean{
        val timeZone = SharedHelper.getUncleSPString(SharedHelper.UNCLE_SPKEY.UNCLE_TIMEZONE)
        return timeZone.endsWith("xaf")
    }

    /**
     * 赞比亚 	260
     */
    fun isZmb(): Boolean{
        val timeZone = SharedHelper.getUncleSPString(SharedHelper.UNCLE_SPKEY.UNCLE_TIMEZONE)
        return timeZone.endsWith("zmb")
    }

    /**
     * 塞内加尔  221
     */
    fun isSenegal(): Boolean{
        val timeZone = SharedHelper.getUncleSPString(SharedHelper.UNCLE_SPKEY.UNCLE_TIMEZONE)
        return timeZone.endsWith("senegal")
    }

    /**
     * 坦桑尼亚  255
     */
    fun isTanz(): Boolean{
        val timeZone = SharedHelper.getUncleSPString(SharedHelper.UNCLE_SPKEY.UNCLE_TIMEZONE)
        return timeZone.endsWith("tanz")
    }

}